/**
 * @file 本地缓存
 * @author Iain
 * @creation 2021/11/06
 */

const storageKey = [
  // 系统信息
  "SystemInfo",
];
let storage = {};
for (const i in storageKey) {
  storage["get" + storageKey[i]] = () => {
    const key = storageKey[i];
    return uni.getStorageSync(key);
  };
  storage["set" + storageKey[i]] = (data) => {
    const key = storageKey[i];
    return uni.setStorageSync(key, data);
  };
  storage["remove" + storageKey[i]] = () => {
    const key = storageKey[i];
    return uni.removeStorageSync(key[i]);
  };
}

export default storage;
